home *** CD-ROM | disk | FTP | other *** search
/ ShareWare OnLine 2 / ShareWare OnLine Volume 2 (CMS Software)(1993).iso / archiver / mta_vf35.zip / MTA__BAT.EXE / MTABETWN.BAT < prev    next >
DOS Batch File  |  1990-09-09  |  5KB  |  117 lines

  1. ECHO OFF
  2. REM ********************************************************************
  3. REM * This is common batch-file, used as an extended replacement of    *
  4. REM * most of the MTA 11.15 options, now stripped.                     *
  5. REM ********************************************************************
  6. REM * In MTA's ExitBetweenConversion option, you can pass, besides     *
  7. REM * your own, three variables to this batch. MTA will replace these  *
  8. REM * variables with constants and will call this batch.               *
  9. REM *                                                                  *
  10. REM * The variables you can supply in ExitBewteenConversion (optio-    *
  11. REM * nal) will be replaced by:                                        *
  12. REM *                                                                  *
  13. REM * %1  : Relative directory containing the decompressed files. This *
  14. REM *       parameter is obsolete, because MTA will switch to this     *
  15. REM *       directory, just before this batch is called, but is still  *
  16. REM *       available because of compatibility with previous versions  *
  17. REM * %2  : New filename (not extension) of the NEW compressed file    *
  18. REM *       to be created by MTA                                       *
  19. REM * %3  : New extension (no point) of the NEW compressed file to be  *
  20. REM *       created by MTA                                             *
  21. REM ********************************************************************
  22. REM
  23. REM ********************************************************************
  24. REM * WARNING: C:\ZIP is a temporary directory MTA does not use at all *
  25. REM *          so substitute one of your own (e.g. the root)  !!!!!!!! *
  26. REM ********************************************************************
  27. REM
  28. REM --------------------------------------------------------------------
  29. REM - This example will:                                               -
  30. REM - = Create a file with CRC's (with CRC32.EXE) to be included in    -
  31. REM -   the new archive. The name is the name of the new archive       -
  32. REM -   with extension .CRC;                                           -
  33. REM - = Append this data to a masterfile called MASTER.CRC in C:\ZIP;  -
  34. REM - = Create a file with a directory of all files in the new ar-     -
  35. REM -   chives (with MTD.EXE). The name is the name of the new archive -
  36. REM -   with extension .DIR;                                           -
  37. REM - = Append this data to a masterfile called MASTER.DIR in C:\ZIP   -
  38. REM --------------------------------------------------------------------
  39. REM
  40. REM Delete all old files from the directory (if any, can also be done
  41. REM with MTA's Exclude options)
  42. REM
  43. DEL %2.CRC
  44. DEL %2.DIR
  45. REM
  46. REM Create the file xxxxxxxx.CRC in the directory C:\ZIP
  47. REM Never create the file in the CURRENT directory, because CRC32 will
  48. REM then include the file xxxxxxxx.CRC (with a length of 0) in the
  49. REM listing, because the redirected file is created as CRC32 starts;
  50. REM
  51. ECHO ----------------------------------------------------------------- >C:\ZIP\%2.CRC
  52. ECHO CRC of File : %2.%3 >>C:\ZIP\%2.CRC
  53. ECHO ----------------------------------------------------------------- >>C:\ZIP\%2.CRC
  54. CRC32 >>C:\ZIP\%2.CRC
  55. ECHO (EOF) >>C:\ZIP\%2.CRC
  56. REM
  57. REM Copy the xxxxxxxx.CRC file to the current directory and delete it
  58. REM from C:\ZIP (you can replace COPY & DIR with MOVE if you have this
  59. REM option available
  60. REM
  61. COPY C:\ZIP\%2.CRC
  62. DEL  C:\ZIP\%2.CRC
  63. REM
  64. REM Check if MASTER.CRC is available, if so, so a difficult append
  65. REM otherwise create the file. You can replace this part with a
  66. REM append-like statement if you have such a program available
  67. REM
  68. IF NOT EXIST C:\ZIP\MASTER.CRC GOTO CopyCRC
  69. GOTO AppendCRC
  70. :AppendCRC
  71. COPY C:\ZIP\MASTER.CRC
  72. COPY MASTER.CRC+%2.CRC C:\ZIP\MASTER.CRC
  73. DEL  MASTER.CRC
  74. GOTO MakeDir
  75. :CopyCRC
  76. COPY %2.CRC C:\ZIP\MASTER.CRC
  77. GOTO MakeDir
  78. REM
  79. REM Create a diretory of all uncompressed files and spool it to the
  80. REM new file xxxxxxxx.DIR (use MTA_DIR)
  81. REM Never create the file in the CURRENT directory, because MTA_DIR
  82. REM will then include the file xxxxxxxx.DIR (with a length of 0) in
  83. REM the listing, because the redirected file is created as MTA_DIR
  84. REM starts;
  85. REM
  86. :MakeDir
  87. ECHO ----------------------------------------------------------------- >C:\ZIP\%2.DIR
  88. ECHO DIR of File : %2.%3 >>C:\ZIP\%2.DIR
  89. ECHO ----------------------------------------------------------------- >>C:\ZIP\%2.DIR
  90. DIR >>C:\ZIP\%2.DIR
  91. REM
  92. REM Copy the xxxxxxxx.DIR file to the current directory and delete it
  93. REM from C:\ZIP (you can replace COPY & DIR with MOVE if you have this
  94. REM option available
  95. REM
  96. COPY C:\ZIP\%2.DIR
  97. DEL  C:\ZIP\%2.DIR
  98. REM
  99. REM Check if MASTER.DIR is available, if so, so a difficult append
  100. REM otherwise create the file. You can replace this part with a
  101. REM append-like statement if you have such a program available
  102. REM
  103. IF NOT EXIST C:\ZIP\MASTER.DIR GOTO CopyDIR
  104. GOTO AppendDIR
  105. :AppendDIR
  106. COPY C:\ZIP\MASTER.DIR
  107. COPY MASTER.DIR+%2.DIR C:\ZIP\MASTER.DIR
  108. DEL  MASTER.DIR
  109. GOTO EndBatch
  110. :CopyDIR
  111. COPY %2.DIR C:\ZIP\MASTER.DIR
  112. GOTO EndBatch
  113. REM
  114. REM That is all there was.........
  115. REM
  116. :EndBatch
  117.